﻿using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using DAO;
using DTO;


namespace BUS
{
    public class PhieuTraService
    {
        public static int LayMaPhieuTraMax()
        {
            PhieuTraRepository phieuTraRep = new PhieuTraRepository();
            int maPhieuTra = phieuTraRep.LayMaPhieuTraMax();
            return maPhieuTra;
        }

        public static void LapPhieuTraSach(PhieuTraDTO phieuTraDTO)
        {
            try
            {
                PhieuTraRepository phieuTraRep = new PhieuTraRepository();
                phieuTraRep.LapPhieuTraSach(phieuTraDTO);
            }
            catch (System.Exception)
            { 
            }
        }
        public static DataTable LayThongTinSachTra(int maDocGia)
        {
            PhieuTraRepository phieuTraRep = new PhieuTraRepository();
            return phieuTraRep.LayThongTinSachTra(maDocGia);
        }

    }
}
